/**
 * Created by Administrator on 2017/1/13.
 */
public class Test03 {
    public static void main(String[] args) {
        System.out.println(LeftRotateString("abcXYZdef", 3));
    }

    public static String LeftRotateString(String str, int n) {
        if (str.length() == 0 || n < 0) {
            return "";
        }
        return str.substring(n) + str.substring(0, n);
    }

}
